package demo1;

public class Test {
    public static void main(String[] args) {
        //Animal animal = new Animal();
        Bird bird = new Bird(2,"黑子");
        bird.func();
        System.out.println("-----------");
        Animal animal = new Bird(1,"白白");//发生向上转型
        animal.func();
    }
}
